package com.demiroot.server;

import java.util.LinkedList;
import java.util.List;

public class Config {
	private String physical;
	private String notFound;
	private String authToken;
	private List<String> updateSites = new LinkedList<String>();
	private List<Folder> htdocs = new LinkedList<Folder>();
	private List<Folder> jdocs = new LinkedList<Folder>();
	private List<Folder> templates = new LinkedList<Folder>();
	private String proxyIntercept;
	
	public Config(){}
	
	public void setNotFoundPage(String page) {
		notFound = page;
	}
	
	public String getNotFoundPage() {
		return notFound;
	}
	
	public void setPhysicalPage(String page) {
		physical = page;
	}
	
	public String getPhysicalPage() {
		return physical;
	}
	
	public void addDNSSite(String site) {
		updateSites.add(site);
	}
	
	public List<String> getDNSSites() {
		return updateSites;
	}
	
	public void setAuthToken(String token) {
		authToken = token;
	}
	
	public String getAuthToken() {
		return authToken;
	}
	
	public void addHtdocsLoc(String loc, int authLvl) {
		htdocs.add(new Folder(loc, authLvl));
	}
	
	public List<Folder> getHtdocsLocs() {
		return htdocs;
	}
	
	public void addjdocsLoc(String loc, int authLvl) {
		jdocs.add(new Folder(loc,authLvl));
	}
	
	public List<Folder> getJdocsLocs() {
		return jdocs;
	}
	
	public void addTemplateLoc(String loc, int authLvl) {
		templates.add(new Folder(loc,authLvl));
	}
	
	public List<Folder> getTemplateLocs() {
		return templates;
	}
	
	public class Folder {
		private int auth;
		private String loc;
		
		public Folder(String loc, int auth) {
			this.loc = loc;
			this.auth = auth;
		}
		
		public int getAuthLvl() {
			return auth;
		}
		
		public String getLocation() {
			return loc;
		}
	}

	public void setProxyIntercept(String pi) {
		proxyIntercept = pi;
	}
	
	public String getProxyIntercept() {
		return proxyIntercept ;
	}
}

